package com.ququ.syb.entrance.fegin;

import com.ququ.common.result.Result;
import com.ququ.common.result.ResultJson;
import com.ququ.syb.common.pojo.AccountInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "account-business")
public interface AccountBusinessFegin {
    @RequestMapping(value = "/token")
    Result<String> getToken(@RequestParam(value = "accountid") String accountid);

    @RequestMapping("/query")
    Result<AccountInfo> getAccountInfo(@RequestParam(value = "accountid") String accountid);

    @RequestMapping("/register")
    Result<AccountInfo> register(@RequestParam(value = "accountid") String accountid,
                                @RequestParam(value = "name") String name,
                                @RequestParam(value = "mobile") String mobile,
                                @RequestParam(value = "accountname") String accountname,
                                @RequestParam(value = "appcode") String appcode,
                                @RequestParam(value = "partner") String partner,
                                @RequestParam(value = "idcardno") String idcardno,
                                @RequestParam(value = "password") String password);

    @RequestMapping("/update")
    Result<AccountInfo> update(@RequestParam(value = "accountid") String accountid,
                                @RequestParam(value = "name") String name,
                                @RequestParam(value = "mobile") String mobile,
                                @RequestParam(value = "accountname") String accountname,
                                @RequestParam(value = "appcode") String appcode,
                                @RequestParam(value = "partner") String partner,
                                @RequestParam(value = "idcardno") String idcardno,
                                @RequestParam(value = "allowpay") Integer allowpay,
                                @RequestParam(value = "allowwithdraw") Integer allowwithdraw,
                                @RequestParam(value = "password") String password,
                                @RequestParam(value = "status") Integer status);


    @RequestMapping("/password/set")
    ResultJson setPassword(@RequestParam(value = "accountid") String accountid,
                           @RequestParam(value = "password") String password);

}
